/*
 * testa.java
 */

package organiser;

import java.awt.Color;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.*;

/**
 * @author Robin Gjurovski
 */

public class testa implements MouseListener{
    private JButton jb = new JButton();
    private JTextField  tf = new JTextField();
    private JFrame frame = new JFrame();
    private JPanel panel = new JPanel();

    public testa(){
        jb.setBounds(10, 10, 100, 100);
        frame.setSize(600, 400);
//        panel.setSize(600, 400);
        panel.setLayout(null);
        panel.setBackground(Color.ORANGE);

        tf.setText("HEJSAN");
        tf.setOpaque(false);
        tf.setBorder(null);
        tf.setSize(20,30);
        tf.setEditable(false);
        tf.addMouseListener(this);
        tf.setDragEnabled(true);

        jb.add(tf);
        panel.add(jb);
        frame.add(panel);
       
        frame.setVisible(true);
    }
    public static void main(String[] args) {
        testa test = new testa();
    }

    public void mouseClicked(MouseEvent e) {
        if(e.getSource() == tf){
            System.out.println("HEHEHEHEHEHE");
        }
    }

    public void mousePressed(MouseEvent e) {
    }

    public void mouseReleased(MouseEvent e) {
    }

    public void mouseEntered(MouseEvent e) {
    }

    public void mouseExited(MouseEvent e) {
    }

}
